<ul class="nav navbar-nav">
    <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
           aria-expanded="false">项目{% if request.tracer.project %}({{ request.tracer.project.name }}){% endif %} <span class="caret"></span></a>
        <ul class="dropdown-menu">
        {% if my %}
        <li style="color: #31b0d5"><i class="fa fa-user-o" aria-hidden="true"></i> 我创建的项目</li>
            {% for foo in my %}
            <li><a href="{% url 'web:manage_dashboard' project_id=foo.id %}">{{ foo.name }}</a></li>
            {% endfor %}
            <li role="separator" class="divider"></li>

        {% endif %}
        {% if join %}

        <li style="color: #31b0d5"><i class="fa fa-user-o" aria-hidden="true"></i>我参与的项目</li>
            {% for foo in join %}
            <li><a href="{% url 'web:manage_dashboard' project_id=foo.id %}">{{ foo.project.name }}</a></li>
            {% endfor %}

        {% endif %}
            <li><a href="#">所有项目</a></li>
        </ul>
    </li>
</ul>